package com.atguigu.gulimall.ware.dao;

import com.atguigu.gulimall.ware.entity.WareSkuEntity;
import com.atguigu.gulimall.ware.vo.SkuHasStockVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品库存
 *
 * @author guolvcen
 * @email guolvcen@gmail.com
 * @date 2023-01-10 20:50:10
 */
@Mapper
public interface WareSkuDao extends BaseMapper<WareSkuEntity> {
    void updateStock(@Param("skuId") Long skuId, @Param("wareId") Long wareId, @Param("skuNum") Integer skuNum);

    List<SkuHasStockVo> skuIdsHasStock(@Param("skuIds") List<Long> skuIds);

}
